#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPoint>
#include <QList>
#include <QPixmap>
#include <QRect>
#include "gameinfo.h"
namespace Ui {
class MainWindow;                      //分支测试
}
class QMovie;
class Turret;
class Enemy;
class Bullet;
class AudioPlayer;
class Option;
class Game;
class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    GameInfo gameinfo;                //关卡信息
    AudioPlayer *audio;               //音频文件
    Option *option;                   //设置窗口
    Game *game;
    int scene_number;                 //解锁关卡数
    int sceneid;                      //当前关卡

    int i;
    QPainter *p;

    QPixmap sprite;     //图片文件，不止，先写着
    QRect nowRect;
    friend QDataStream& operator<<(QDataStream &out, const MainWindow &u);
    friend QDataStream& operator>>(QDataStream &in, MainWindow &u);                      //文件读取

    void changeWindow(int id);
public slots:
    void return_MainWindow(bool clicked);
    void updateMap();
private slots:



    void on_toolButton_clicked();

    void on_toolButton_3_clicked();

    void on_toolButton_8_toggled(bool checked);

    void on_toolButton_6_clicked();

    void on_toolButton_2_clicked();

    //void updateMap();
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_toolButton_pressed();

    void on_toolButton_2_pressed();

    void on_toolButton_3_pressed();

private:
    Ui::MainWindow *ui;
protected:
    void paintEvent(QPaintEvent *event);
};

#endif // MAINWINDOW_H
